import Vue from 'vue'
import Router from 'vue-router'
import MainContent from '@/components/MainContent'
import BackstageContent from '@/components/BackstageContent'
import CentralContent from "../components/views/CentralContent";
import UserModules from "../components/modules/UserModules";
import BlogContentModules from "../components/modules/BlogContentModules";
import ThemeSettingView from "../components/backendmodules/ThemeSettingView";

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'MainContent',
      component: MainContent,
      redirect: '/views/CentralContent',
      children: [
        {
          path: '/views/CentralContent',
          name: 'CentralContent',
          component: CentralContent,
          redirect: '/modules/BlogContentModules',
          children: [
            {
              path: '/modules/UserModules',
              name: 'UserModules',
              component: UserModules
            },
            {
              path: '/modules/BlogContentModules',
              name: 'BlogContentModules',
              component: BlogContentModules
            }
          ]
        }
      ]
    },
    {
      path: '/BackstageContent',
      name: 'BackstageContent',
      component: BackstageContent,
      redirect: '/backendmodules/ThemeSettingView',
      children: [
        {
          path: '/backendmodules/ThemeSettingView',
          name: 'ThemeSettingView',
          component: ThemeSettingView
        }
      ]
    }
  ]
})
